package kitchen.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * FoodRecommendedDaily entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "food_recommended_daily", catalog = "delicacy")
public class FoodRecommendedDaily implements java.io.Serializable {

	// Fields

	private String foodId;
	private Food food;
	private String description;

	// Constructors

	/** default constructor */
	public FoodRecommendedDaily() {
	}

	/** full constructor */
	public FoodRecommendedDaily(String foodId, Food food, String description) {
		this.foodId = foodId;
		this.food = food;
		this.description = description;
	}

	// Property accessors
	@Id
	@Column(name = "food_id", unique = true, nullable = false, length = 50)
	public String getFoodId() {
		return this.foodId;
	}

	public void setFoodId(String foodId) {
		this.foodId = foodId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Food getFood() {
		return this.food;
	}

	public void setFood(Food food) {
		this.food = food;
	}

	@Column(name = "description", nullable = false)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}